package com.deceive.demo;

import android.app.Activity;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

public class Mainctivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Window window = this.getWindow();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            window.setStatusBarColor(Color.parseColor("#ffffff"));
        }
        View decor = getWindow().getDecorView();
        decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        TextView tvRoot = findViewById(R.id.tv_root);
        TextView tvPhone = findViewById(R.id.tv_phone);
        tvPhone.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String aa="https://login.kwaixiaodian.com/?biz=zone&redirect_url=https%3A%2F%2Fs.kwaixiaodian.com%2Fzone%2Fles%2Fbp";
                WebViewActivity.startMyWebViewActivity(Mainctivity.this,aa);
            }
        });
        if (JudgeUtils.isRooted()) {
            tvRoot.setText("设备有root权限");
        } else {
            tvRoot.setText("设备没有root权限");
        }

        if (JudgeUtils.isSimulator()) {
            tvPhone.setText("设备是模拟器");
        } else {
            tvPhone.setText("设备不是模拟器");
        }

    }


}

